import Topbanner from '../component/TopBanner/index.js'
import TextMoreButton from '../component/TextMoreButton/index.js'
import EvokeButton  from '../component/EvokeButton/index.js'
import VideoButton from '../component/VideoButton/index.js'
import Swiper from '../component/Swiper/index.js'
import Aside from '../component/Aside/index.js'

new Aside({
    element: document.querySelector('.back-top'),
    color: 'gray',
    position: 'right',
    model:'circle',
    callback: () => { 
        console.log('这是回到顶部的回调');
    }
})

new Topbanner({
    element: document.querySelector('.top-banner'),
    mode: 'dark',
    location: 'top',
    isFixed: true,
    callback: () => { 
        console.log('这是顶部导航回调');
    }
})

new TextMoreButton({
    element: document.querySelector('.click-read'),
    mode: 'light',
    color: 'red',
    text: '打开"App",查看更多有趣内容',
    type: 'article',
    callback: () => { 
        console.log('textmorebutton的回调');
    }
})

new EvokeButton({
    element: document.querySelector('.evoke-button'),
    text: '网易新闻',
    src:'https://www.baidu.com/s?ie=UTF-8&wd=npm',
    type: '',
    callback: () => { 
        console.log('EvokeButton的回调');
    }
})
new VideoButton({
    element: document.querySelector('.video-button'),
    color: 'red',
    src: 'https://cms-bucket.ws.126.net/2021/0525/3012c74fp00qtniu0008tc000go006yc.png',
    callback: () => { 
        console.log('这是videoButton回调');
    }
})

new EvokeButton({
    element: document.querySelector('.comment-button-arrow'),
    text: '打开网易新闻',
    color: 'red',
    type: 'comment',
    callback: () => { 
        console.log('这是EvokeButton回调');
    }
})

new TextMoreButton({
    element: document.querySelector('.comment-button'),
    text: '打开"App"，查看更多评论',
    type: 'comment',
    color: 'red',
    callback: () => { 
        console.log('这是TextMoreButton回调');
    }
})

new Swiper({
    container:document.querySelector('.swiper'),
    mode: 'dark',
    type: 'comment',
    position: 'bottom',
    direction:'...',
    data: [{
        'img': 'https://img.36krcdn.com/20200828/v2_09cbece3aa684ad2a4f3a58daa4f6f10_img_000',
        'text': '111热门文章：父母最大的悲哀是年老后在子女面前变得小心翼翼',
        'url': 'www.baidu.com'
      },{
        'img': 'https://img.36krcdn.com/20200401/v2_eaf81d89a62d4cffbe62164ae29503b7_img_000?x-oss-process=image/resize,p_5/blur,r_3,s_2',
        'text': '2222热门跟贴：前年去西藏自驾，看到近边境延绵十几公里的野战军临时营房、装备和车辆，和俄罗斯方块一样整齐，委实震撼。反观印度，感觉就是草台班子唱戏。。',
        'url': 'www.baidu.com'
      },{
        'img': 'https://img.36krcdn.com/20200401/v2_6b4d69301bc943d6a70db63cf65d3f35_img_000?x-oss-process=image/resize,p_5/blur,r_3,s_2',
        'text': '3333热门文章：父母最大的悲哀是年老后在子女面前变得小心翼翼',
        'url': 'www.baidu.com'
        }],
        callback: (index) => { 
            console.log('这是swiper回调,index为'+index);
        }
})
